Maximum allowed current: $I_{\max }=10 \mathrm{~mA}$

$$

\begin{aligned}

& V_R=5 \mathrm{~V} ; I_{\max }=10 \mathrm{~mA} \\

& R \geq \frac{V_R}{I_{\max }}=\frac{5 \mathrm{~V}}{10 \mathrm{~mA}}=500 \Omega

\end{aligned}

$$



Smallest value of R is $500 \Omega$